package
{
	public class fun
	{
		static public const s_PI_180:Number = 180/Math.PI;
		static public const s_180_PI:Number = Math.PI/180;
		static public function sin( v:Number ):Number{
			return Math.sin(v*s_180_PI);
		}
		static public function cos( v:Number ):Number{
			return Math.cos(v*s_180_PI);
		}
		static public function atg( y:Number, x:Number ):Number{	//求反正切,返回0-359度
			if(x==0){
				if(y==0)return 0;	//两点重合
				if(y>0)return -90;	//0度角,在flash坐标系中为-90度
				return 90;//-90度角,在flash坐标系中为90度
			}
			var a:Number = Math.atan(y/x)*s_PI_180;
			if(x>0)return a;
			return a+180;
		}
		static public function len2( x:Number, y:Number ):Number{
			return Math.sqrt(x*x+y*y);
		}
		//
		public function fun()
		{
		}

	}
}